Skip to content

Conversation

@Grufoony
Copy link
Collaborator

@Grufoony Grufoony requested a review from sbaldu December 11, 2024 09:34

namespace dsm {
Station::Station(Id id, Delay managementTime)
: Node(id), m_managementTime{managementTime} {}

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
: Node(id), m_managementTime{managementTime} {}

Station::Station(Id id, std::pair<double, double> coords, Delay managementTime)
: Node(id, coords), m_managementTime{managementTime} {}

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
: Node(id, coords), m_managementTime{managementTime} {}

Station::Station(Station const& other)
: Node(other), m_managementTime{other.m_managementTime}, m_trains{other.m_trains} {}

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
: Node(other), m_managementTime{other.m_managementTime}, m_trains{other.m_trains} {}

void Station::enqueue(Id trainId, train_t trainType) {
m_trains.emplace(trainType, trainId);

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 17.7 rule Note

MISRA 17.7 rule
}
}
WHEN("The Station is created using an Id and coordinates") {
Station station{id, std::make_pair(lat, lon), managementTime};

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note test

MISRA 12.3 rule
}
}
WHEN("The Station is created using a copy constructor") {
Station base{id, std::make_pair(lat, lon), managementTime};

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note test

MISRA 12.3 rule
: Node(id, coords), m_managementTime{managementTime} {}

Station::Station(Node const& node, Delay managementTime)
: Node(node), m_managementTime{managementTime} {}

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
@Grufoony Grufoony marked this pull request as draft December 12, 2024 08:54
@Grufoony Grufoony marked this pull request as ready for review December 13, 2024 08:23
@Grufoony Grufoony changed the title Add Station Class Add Station Class Dec 13, 2024
@Grufoony Grufoony merged commit 95150b0 into main Dec 13, 2024
25 checks passed
@Grufoony Grufoony deleted the feature_addStation branch December 13, 2024 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement TrainStation class

2 participants